package com.flc.gateway.data;

import com.flc.gateway.utils.ByteUtils;

/**
 * 登陆数据pojo
 * @author haizi
 * @date 2018/1/1
 */
public class LoginData {

    public LoginData(byte[] data) {
        this.time = ByteUtils.getLong32WithIndex(data, 0);
        this.deviceId = ByteUtils.getLong32WithIndex(data, 4);
        this.deviceIMEI = ByteUtils.getStringWithIndex(data, 8, 15);
    }

    /** 登录的设备ID */
    private long deviceId;
    /** 登录发起的时间戳 */
    private long time;
    /** 登录发起的设备手机号码 */
    private String deviceIMEI;

    public long getDeviceId() {
        return deviceId;
    }

    public long getTime() {
        return time;
    }

    public String getDeviceIMEI() {
        return deviceIMEI;
    }
}
